﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;
using System.IO;
using System.Xml.Linq;
using System.Windows.Browser;
using System.Windows.Media.Effects;
using System.Windows.Printing;
using System.Threading;
using System.Windows.Resources;

namespace FloorPlan
{
    public partial class MainPage : UserControl
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        private Image _btnlevelg;
        private Image _btnlevellg;
        private Image _btnprint;
        private string previoussearch;
        private byte[] printBuffer;
        private Stream printStream;
        private XDocument xDoc;
        private XDocument xDoc1;
        private ChildWindow1 dcw;
        private wsendtofriend dcw1;
        private string baseAddress = string.Empty;
        public bool IsWorking
        {
            get
            {
                return this.myprogress.IsIndeterminate;
            }
            set
            {
                this.myprogress.IsIndeterminate = value;
            }
        }

        public bool IsWorking_1
        {
            get
            {
                return this.myprogress.IsIndeterminate;
            }
            set
            {
                this.myprogress.IsIndeterminate = value;
            }
        }

        public bool IsWorking_2
        {
            get
            {
                return this.myprogress.IsIndeterminate;
            }
            set
            {
                this.myprogress.IsIndeterminate = value;
            }
        }

        public bool IsWorking_3
        {
            get
            {
                return this.myprogress.IsIndeterminate;
            }
            set
            {
                this.myprogress.IsIndeterminate = value;
            }
        }

        public bool IsWorking_g
        {
            get
            {
                return this.myprogress.IsIndeterminate;
            }
            set
            {
                this.myprogress.IsIndeterminate = value;
            }
        }
        public MainPage()
        {
            InitializeComponent();
            this.dcw1 = new wsendtofriend();
            this.previoussearch = string.Empty;
            this.dcw = new ChildWindow1();

            this.SetupEventHandlers();
        }

        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            this.IsWorking = true;
            this.IsWorking_g = true;
            this.IsWorking_1 = true;
            this.IsWorking_2 = true;
            this.IsWorking_3 = true;
            this.baseAddress = App.Current.Host.InitParams["BaseAddress"];

            BitmapImage image = new BitmapImage();
            image.DownloadProgress += this.bitmapImage_DownloadProgress;
            image.UriSource = new Uri(baseAddress + "images/new_groundfloor.jpg", UriKind.Absolute);
            this.imglg.Source = image;
            WebClient client = new WebClient();
            client.OpenReadCompleted += this.wc_OpenReadCompleted;
            client.OpenReadAsync(new Uri(baseAddress + "Xml/Brand_Category.xml", UriKind.Absolute));
        }

        private void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                using (Stream stream = e.Result)
                {
                    this.xDoc = XDocument.Load(stream);
     
                    IEnumerable<XElement> enumerable = this.xDoc.Descendants("Categories").Elements<XElement>("category");
                    foreach (XElement element in enumerable)
                    {
                        this.lstcategory.Items.Add(new KeyValuePair(element.Attribute("id").Value,
                            element.Attribute("Name").Value));
                    }
                    WebClient client = new WebClient();
                    client.OpenReadCompleted += this.wc_OpenReadCompleted1;
                    client.OpenReadAsync(new Uri(baseAddress + "Xml/Shops.xml", UriKind.RelativeOrAbsolute));
                }
            }
        }

        private void wc_OpenReadCompleted1(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                using (Stream stream = e.Result)
                {
                    this.xDoc1 = XDocument.Load(stream);
                }
                HtmlDocument document = HtmlPage.Document;
                foreach (KeyValuePair<string, string> pair in document.QueryString)
                {
                    if (Convert.ToString(pair.Key) == "sh")
                    {
                        this.higlightquerystring(pair.Value);
                    }
                }
            }
        }

        private void bitmapImage_DownloadProgress(object sender, DownloadProgressEventArgs e)
        {
            int num = e.Progress;
            if (e.Progress == 100)
            {
                this.IsWorking = false;
                this.GRF.Visibility = Visibility.Collapsed;
                BitmapImage image = new BitmapImage();
                image.DownloadProgress += this.bitmapImagelevelg_DownloadProgress;
                image.UriSource = new Uri(baseAddress + "images/level-G-1.jpg", UriKind.RelativeOrAbsolute);
                this.imglevelg.Source = image;
            }
            else
            {
                this.GRF.Visibility = Visibility.Visible;
                this.Ground.Visibility = Visibility.Visible;
                this.First.Visibility = Visibility.Visible;
                this.Second.Visibility = Visibility.Visible;
                this.Third.Visibility = Visibility.Visible;
                this.myprogress.Visibility = Visibility.Collapsed;
                this.IsWorking = true;
                this.txtproglabel.Text = "Please Wait Loading.. Level LG";
            }
        }

        private void SetupEventHandlers()
        {
            this.access_to_future.MouseLeftButtonDown += new MouseButtonEventHandler(this.Acess_to_Feature_MouseLeftButtonDown);
            this.access_to_future.MouseLeave += new MouseEventHandler(this.Acess_to_Feature_MouseLeave);
            this.access_to_future.MouseEnter += new MouseEventHandler(this.Acess_to_Feature_MouseEnter);
            //path

            this.reliance_digital.MouseEnter += new MouseEventHandler(reliance_digital_MouseEnter);
            this.reliance_digital.MouseLeave += new MouseEventHandler(reliance_digital_MouseLeave);
            this.reliance_digital.MouseLeftButtonDown += new MouseButtonEventHandler(reliance_digital_MouseLeftButtonDown);
            //search
            this.btnsearch.MouseLeftButtonDown += new MouseButtonEventHandler(btnsearch_MouseLeftButtonDown);
            this.btnlegends.MouseLeftButtonDown += new MouseButtonEventHandler(btnlegends_MouseLeftButtonDown);
            this.btntextgo.Click += new RoutedEventHandler(btntextgo_Click);
            this.btnshopgo.Click += new RoutedEventHandler(btnshopgo_Click);
            this.lstcategory.SelectionChanged += this.lstcategory_SelectionChanged;
            this.lstshopbyname.SelectionChanged += this.lstshopbyname_SelectionChanged;

            //legend
            this.bdrtoilet.MouseLeave += new MouseEventHandler(bdrtoilet_MouseLeave);
            this.bdrtoilet.MouseEnter += new MouseEventHandler(bdrtoilet_MouseEnter);
            this.bdrumbrellapark.MouseLeave += new MouseEventHandler(this.bdrumbrellapark_MouseLeave);
            this.bdrumbrellapark.MouseEnter += new MouseEventHandler(this.bdrumbrellapark_MouseEnter);

            this.ico_atm.MouseEnter += new MouseEventHandler(this.ico_atm_MouseEnter);
            this.ico_babycare.MouseEnter += new MouseEventHandler(this.ico_babycare_MouseEnter);
            this.ico_babychange.MouseEnter += new MouseEventHandler(this.ico_babychange_MouseEnter);
            this.ico_bagpark.MouseEnter += new MouseEventHandler(this.ico_bagpark_MouseEnter);
            this.ico_disabled.MouseEnter += new MouseEventHandler(this.ico_disabled_MouseEnter);
            this.ico_elevator.MouseEnter += new MouseEventHandler(this.ico_elevator_MouseEnter);
            this.ico_escalator.MouseEnter += new MouseEventHandler(this.ico_escalator_MouseEnter);
            this.ico_feedback.MouseEnter += new MouseEventHandler(this.ico_feedback_MouseEnter);
            this.ico_gentsnamaz.MouseEnter += new MouseEventHandler(this.ico_gentsnamaz_MouseEnter);
            this.ico_infobooth.MouseEnter += new MouseEventHandler(this.ico_infobooth_MouseEnter);
            this.ico_information.MouseEnter += new MouseEventHandler(this.ico_information_MouseEnter);
            this.ico_ladiesnamaz.MouseEnter += new MouseEventHandler(this.ico_ladiesnamaz_MouseEnter);
            this.ico_stairs.MouseEnter += new MouseEventHandler(this.ico_stairs_MouseEnter);
            this.ico_tailoring.MouseEnter += new MouseEventHandler(this.ico_tailoring_MouseEnter);
            this.ico_toilet.MouseEnter += new MouseEventHandler(this.ico_toilet_MouseEnter);
            this.ico_umbrella.MouseEnter += new MouseEventHandler(this.ico_umbrella_MouseEnter);

            //level
            this.btnlegends.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlegends_MouseLeftButtonDown);
            this.btnlevel1.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlevel1_MouseLeftButtonDown);
            this.btnlevel2.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlevel2_MouseLeftButtonDown);
            this.btnlevel3.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlevel3_MouseLeftButtonDown);
            this.btnlevelg.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlevelg_MouseLeftButtonDown);
            this.btnlevellg.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnlevellg_MouseLeftButtonDown);

            this.btnprint.MouseEnter += new MouseEventHandler(btnprint_MouseEnter);
            this.btnprint.MouseLeave += new MouseEventHandler(btnprint_MouseLeave);
            this.btnprint.MouseLeftButtonDown += new MouseButtonEventHandler(this.btnprint_MouseLeftButtonDown);

            this.btnsend.MouseEnter += new MouseEventHandler(btnsend_MouseEnter);
            this.btnsend.MouseLeave += new MouseEventHandler(btnsend_MouseLeave);
            this.btnsend.MouseLeftButtonDown += new MouseButtonEventHandler(btnsend_MouseLeftButtonDown);

            this.btnsave.MouseEnter += new MouseEventHandler(btnsave_MouseEnter);
            this.btnsave.MouseLeave += new MouseEventHandler(btnsave_MouseLeave);
            this.btnsave.MouseLeftButtonDown += new MouseButtonEventHandler(btnsave_MouseLeftButtonDown);
        }                  

        private void legendsearchtext(object sender, MouseButtonEventArgs e)
        {
        }

        private void btnsearch_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (this.Cnvsearch.Visibility == Visibility.Collapsed)
            {
                this.stopsearchlegendstory();
                this.closeallotherestoryboard();
                this.strsearchcanvas.Begin();
                this.btnlegends.Source = new BitmapImage(new Uri("images/legend_rollout.jpg", UriKind.RelativeOrAbsolute));
                this.btnsearch.Source = new BitmapImage(new Uri("images/search_rollover.jpg", UriKind.RelativeOrAbsolute));
            }
        }

        
        private void accessorize_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.accessorize);
        }

        private void accessorize_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.accessorize);
        }

        private void accessorize_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Accessorize");
        }

        private void ace_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.ace);
        }

        private void ace_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.ace);
        }

        private void ace_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Ace");
        }

        private void Acess_to_Feature_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.access_to_future);
        }

        private void Acess_to_Feature_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.access_to_future);
        }

        private void Acess_to_Feature_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Access to Future");
        }

        private void Adidas_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.adidas);
        }

        private void Adidas_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.adidas);
        }

        private void adidas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Adidas");
        }

        private void alcott_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.alcott);
        }

        private void alcott_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.alcott);
        }

        private void alcott_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Alcott");
        }

        private void and_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.and);
        }

        private void and_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.and);
        }

        private void and_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("AND");
        }

        private void arianna_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.arianna);
        }

        private void arianna_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.arianna);
        }

        private void arianna_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Arianna");
        }

        private void Bag_Zone_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.bag_zone);
        }

        private void Bag_Zone_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.bag_zone);
        }

        private void bag_zone_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Bag Zone");
        }

        private void Baggit_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.baggit);
        }

        private void Baggit_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.baggit);
        }

        private void baggit_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Baggit");
        }

        private void baker_s_inn_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.baker_s_inn);
        }

        private void baker_s_inn_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.baker_s_inn);
        }

        private void baker_s_inn_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Baker's Inn");
        }

        private void Barbie_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.barbie);
        }

        private void Barbie_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.barbie);
        }

        private void barbie_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Barbie");
        }

        private void Baskin_s_Robbins_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.baskin_robbins);
        }

        private void Baskin_s_Robbins_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.baskin_robbins);
        }

        private void baskin_s_robbins_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Baskin Robbins");
        }

        private void bdratm_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyatm.Stop();
            this.storyatm.AutoReverse = false;
            this.storyatm.Begin();
        }

        private void bdratm_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyatm.Stop();
            this.storyatm.AutoReverse = true;
            this.storyatm.Resume();
        }

        private void bdrbabycare_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storybabycare.Stop();
            this.storybabycare.AutoReverse = false;
            this.storybabycare.Begin();
        }

        private void bdrbabycare_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storybabycare.Stop();
            this.storybabycare.AutoReverse = true;
            this.storybabycare.Resume();
        }

        private void bdrbabychange_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storybabychangeunit.Stop();
            this.storybabychangeunit.AutoReverse = false;
            this.storybabychangeunit.Begin();
        }

        private void bdrbabychange_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storybabychangeunit.Stop();
            this.storybabychangeunit.AutoReverse = true;
            this.storybabychangeunit.Resume();
        }

        private void bdrbagpark_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storybagpark.Stop();
            this.storybagpark.AutoReverse = false;
            this.storybagpark.Begin();
        }

        private void bdrbagpark_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storybagpark.Stop();
            this.storybagpark.AutoReverse = true;
            this.storybagpark.Resume();
        }

        private void bdrdisabled_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storydisabled.Stop();
            this.storydisabled.AutoReverse = false;
            this.storydisabled.Begin();
        }

        private void bdrdisabled_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storydisabled.Stop();
            this.storydisabled.AutoReverse = true;
            this.storydisabled.Resume();
        }

        private void bdrelevator_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyelevator.Stop();
            this.storyelevator.AutoReverse = false;
            this.storyelevator.Begin();
        }

        private void bdrelevator_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyelevator.Stop();
            this.storyelevator.AutoReverse = true;
            this.storyelevator.Resume();
        }

        private void bdrescalator_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyescalator.Stop();
            this.storyescalator.AutoReverse = false;
            this.storyescalator.Begin();
        }

        private void bdrescalator_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyescalator.Stop();
            this.storyescalator.AutoReverse = true;
            this.storyescalator.Resume();
        }

        private void bdrfeedback_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyelectronicfeedback.Stop();
            this.storyelectronicfeedback.AutoReverse = false;
            this.storyelectronicfeedback.Begin();
        }

        private void bdrfeedback_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyelectronicfeedback.Stop();
            this.storyelectronicfeedback.AutoReverse = true;
            this.storyelectronicfeedback.Resume();
        }

        private void bdrgentsnamaj_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storygentsnamaj.Stop();
            this.storygentsnamaj.AutoReverse = false;
            this.storygentsnamaj.Begin();
        }

        private void bdrgentsnamaj_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storygentsnamaj.Stop();
            this.storygentsnamaj.AutoReverse = true;
            this.storygentsnamaj.Resume();
        }

        private void bdrinfobooth_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyinfobooth.Stop();
            this.storyinfobooth.AutoReverse = false;
            this.storyinfobooth.Begin();
        }

        private void bdrinfobooth_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyinfobooth.Stop();
            this.storyinfobooth.AutoReverse = true;
            this.storyinfobooth.Resume();
        }

        private void bdrinfomationdesk_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyinformation.Stop();
            this.storyinformation.AutoReverse = false;
            this.storyinformation.Begin();
        }

        private void bdrinfomationdesk_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyinformation.Stop();
            this.storyinformation.AutoReverse = true;
            this.storyinformation.Resume();
        }

        private void bdrladiesnamaj_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyladynamaj.Stop();
            this.storyladynamaj.AutoReverse = false;
            this.storyladynamaj.Begin();
        }

        private void bdrladiesnamaj_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyladynamaj.Stop();
            this.storyladynamaj.AutoReverse = true;
            this.storyladynamaj.Resume();
        }

        private void bdrstairs_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storystairs.Stop();
            this.storystairs.AutoReverse = false;
            this.storystairs.Begin();
        }

        private void bdrstairs_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storystairs.Stop();
            this.storystairs.AutoReverse = true;
            this.storystairs.Resume();
        }

        private void bdrtailoring_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storytailoring.Stop();
            this.storytailoring.AutoReverse = false;
            this.storytailoring.Begin();
        }

        private void bdrtailoring_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storytailoring.Stop();
            this.storytailoring.AutoReverse = true;
            this.storytailoring.Resume();
        }

        private void bdrtoilet_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storytoilet.Stop();
            this.storytoilet.AutoReverse = false;
            this.storytoilet.Begin();
        }

        private void bdrtoilet_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storytoilet.Stop();
            this.storytoilet.AutoReverse = true;
            this.storytoilet.Resume();
        }

        private void bdrumbrellapark_MouseEnter(object sender, MouseEventArgs e)
        {
            this.stopsearchlegendstory();
            this.storyumberlla.Stop();
            this.storyumberlla.AutoReverse = false;
            this.storyumberlla.Begin();
        }

        private void bdrumbrellapark_MouseLeave(object sender, MouseEventArgs e)
        {
            this.storyumberlla.Stop();
            this.storyumberlla.AutoReverse = true;
            this.storyumberlla.Resume();
        }

        private void bitmapImagelevel1_DownloadProgress(object sender, DownloadProgressEventArgs e)
        {
            int num = e.Progress;
            if (e.Progress == 100)
            {
                this.IsWorking_1 = false;
                BitmapImage image = new BitmapImage();
                image.DownloadProgress += this.bitmapImagelevel2_DownloadProgress;
                image.UriSource = new Uri(baseAddress + "images/new_secondfloor.jpg", UriKind.RelativeOrAbsolute);
                this.imglevel2.Source = image;
            }
            else
            {
                this.First.Visibility = Visibility.Visible;
                this.IsWorking_1 = true;
                this.txtproglabel.Text = "Please Wait Downloading Level 1";
            }
        }

        private void bitmapImagelevel2_DownloadProgress(object sender, DownloadProgressEventArgs e)
        {
            int num = e.Progress;
            if (e.Progress == 100)
            {
                this.IsWorking_2 = false;
                BitmapImage image = new BitmapImage();
                image.DownloadProgress += this.bitmapImagelevel3_DownloadProgress;
                image.UriSource = new Uri(baseAddress + "images/new_thirdfloor.jpg", UriKind.RelativeOrAbsolute);
                this.imgthirdfloor.Source = image;
            }
            else
            {
                this.Second.Visibility = Visibility.Visible;
                this.IsWorking_2 = true;
                this.txtproglabel.Text = "Please Wait Downloading Level 2";
            }
        }

        private void bitmapImagelevel3_DownloadProgress(object sender, DownloadProgressEventArgs e)
        {
            int num = e.Progress;
            if (e.Progress == 100)
            {
                this.IsWorking_3 = false;
                this.myprogress.Visibility = Visibility.Collapsed;
                this.txtproglabel.Text = string.Empty;
                this.txtproglabel.Visibility = Visibility.Collapsed;
            }
            else
            {
                this.Third.Visibility = Visibility.Visible;
                this.IsWorking_3 = true;
                this.txtproglabel.Text = "Please Wait Downloading Level 3";
            }
        }

        private void bitmapImagelevelg_DownloadProgress(object sender, DownloadProgressEventArgs e)
        {
            int num = e.Progress;
            if (e.Progress == 100)
            {
                this.IsWorking_g = false;
                BitmapImage image = new BitmapImage();
                image.DownloadProgress+=this.bitmapImagelevel1_DownloadProgress;
                //StreamResourceInfo sr = Application.GetResourceStream(new Uri("images/new_firstfloor.jpg", UriKind.Relative));
                image.UriSource = new Uri(baseAddress + "images/new_firstfloor.jpg", UriKind.RelativeOrAbsolute);
                //image.SetSource(sr.Stream);
                this.imglevel1.Source = image;
            }
            else
            {
                this.Ground.Visibility = Visibility.Visible;
                this.txtproglabel.Text = "Please Wait Downloading Level G";
                this.IsWorking_g = true;
            }
        }

        private void blackberry_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.blackberrys);
        }

        private void blackberry_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.blackberrys);
        }

        private void blackberry_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Blackberrys");
        }

        private void body_shop_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.body_shop);
        }

        private void body_shop_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.body_shop);
        }

        private void body_shop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Body Shop");
        }

        private void Bose_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.bose);
        }

        private void Bose_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.bose);
        }

        private void bose_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Bose");
        }

        private void bowl_house_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.bowl_house);
        }

        private void bowl_house_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.bowl_house);
        }

        private void bowl_house_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Bowl House");
        }

        private void btnlegends_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (this.Cnvslegends.Visibility == Visibility.Collapsed)
            {
                this.legendshow.Begin();
                this.btnlegends.Source = new BitmapImage(new Uri("images/legend_rollover.jpg", UriKind.Relative));
                this.btnsearch.Source = new BitmapImage(new Uri("images/search_rollout.jpg", UriKind.Relative));
            }
        }

        private void btnlevel1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsWorking_1)
            {
                this.strlevel1.Begin();
            }
            //this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollover.jpg", UriKind.Relative));
            //this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.Relative));
            //this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.Relative));
            //this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.Relative));
            //this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.Relative));
        }

        private void btnlevel2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsWorking_2)
            {
                this.strlevel2.Begin();
            }
            //this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.Relative));
            //this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.Relative));
            //this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.Relative));
            //this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollover.jpg", UriKind.Relative));
            //this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.Relative));
        }

        private void btnlevel3_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsWorking_3)
            {
                this.strlevel3.Begin();
            }
            //this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.Relative));
            //this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.Relative));
            //this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.Relative));
            //this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.Relative));
            //this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollover.jpg", UriKind.Relative));
        }

        private void btnlevelg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsWorking_g)
            {
                this.strlevellg.Begin();
            }
            //this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.Relative));
            //this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollover.jpg", UriKind.Relative));
            //this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.Relative));
            //this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.Relative));
            //this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.Relative));
        }

        private void btnlevellg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!this.IsWorking)
            {
                this.strlevelg.Begin();
            }
            //this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.Relative));
            //this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.Relative));
            //this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollover.jpg", UriKind.Relative));
            //this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.Relative));
            //this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.Relative));
        }

        private void btnprint_MouseEnter(object sender, MouseEventArgs e)
        {
            this.btnprint.Source = new BitmapImage(new Uri("images/print_rollover.jpg", 0));
        }

        private void btnprint_MouseLeave(object sender, MouseEventArgs e)
        {
            this.btnprint.Source = new BitmapImage(new Uri("images/print_rollout.jpg", 0));
        }

        private void btnprint_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            PrintDocument document = new PrintDocument();
            document.PrintPage += new EventHandler<PrintPageEventArgs>(this.pd_PrintPage);
            document.Print("Inorbit Cyberabad Map");
        }

        private void pd_PrintPage(object sender, PrintPageEventArgs ev)
        {
            try
            {
                ev.PageVisual = this.canvaspath;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void btnsave_MouseEnter(object sender, MouseEventArgs e)
        {
            this.btnsave.Source = new BitmapImage(new Uri("images/save_rollover.jpg", 0));
        }

        private void btnsave_MouseLeave(object sender, MouseEventArgs e)
        {
            this.btnsave.Source = new BitmapImage(new Uri("images/save_rollout.jpg", 0));
        }

        private void btnsave_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();
            dialog.Filter = "PNG (*.png)|*.png";
            bool flag = true;
            bool? nullable2 = dialog.ShowDialog();
            bool? nullable4 = new bool?(nullable2.GetValueOrDefault() == flag);
            bool? nullable = nullable2.HasValue ? nullable4 : null;
            if (nullable.GetValueOrDefault())
            {
                WriteableBitmap bitmap = null ;
                ScaleTransform transform;
                if (this.GRF.Visibility == Visibility.Collapsed)
                {
                    transform = new ScaleTransform();
                    transform.ScaleX = 2.0;
                    transform.ScaleY = 2.0;
                    bitmap = new WriteableBitmap(this.canvaspath, transform);
                }
                else if (this.Ground.Visibility == Visibility.Collapsed)
                {
                    transform = new ScaleTransform();
                    transform.ScaleX = 2.0;
                    transform.ScaleY = 2.0;
                    bitmap = new WriteableBitmap(this.canvaspath, transform);
                }
                else if (this.First.Visibility == Visibility.Collapsed)
                {
                    transform = new ScaleTransform();
                    transform.ScaleX = 2.0;
                    transform.ScaleY = 2.0;
                    bitmap = new WriteableBitmap(this.canvaspath, transform);
                }
                else if (this.Second.Visibility == Visibility.Collapsed)
                {
                    transform = new ScaleTransform();
                    transform.ScaleX = 2.0;
                    transform.ScaleY = 2.0;
                    bitmap = new WriteableBitmap(this.canvaspath, transform);
                }
                else if (this.Third.Visibility == Visibility.Collapsed)
                {
                    transform = new ScaleTransform();
                    transform.ScaleX = 2.0;
                    transform.ScaleY = 2.0;
                    bitmap = new WriteableBitmap(this.canvaspath, transform);
                }
                int num = bitmap.PixelHeight;
                int num2 = bitmap.PixelWidth;
                bitmap.Invalidate();
                Stream stream2 = Encode(bitmap);
                this.printBuffer = new byte[(stream2.Length - 1L) + 1];
                stream2.Read(this.printBuffer, 0, this.printBuffer.Length);
                Stream stream = dialog.OpenFile();
                stream.Write(this.printBuffer, 0, this.printBuffer.Length);
                stream.Close();
                MessageBox.Show("You PNG has been created.", "Export Complete", 0);
            }
        }


        private void btnsend_MouseEnter(object sender, MouseEventArgs e)
        {
            this.btnsend.Source = new BitmapImage(new Uri("images/send_rollover.jpg", 0));
        }

        private void btnsend_MouseLeave(object sender, MouseEventArgs e)
        {
            this.btnsend.Source = new BitmapImage(new Uri("images/send_rollout.jpg", 0));
        }

        private void btnsend_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.dcw1.Show();
        }

        private void btnshopgo_Click(object sender, RoutedEventArgs e)
        {
            this.bdrtooltip.Visibility = Visibility.Visible;
            this.lstshopbyname.Visibility = Visibility.Visible;
            //if (this.previoussearch, "", false) != 0)
            //{
            //    string str3 = Strings.Replace(Strings.Replace(Strings.Replace(this.previoussearch.ToString().ToLower(), " ", "_", 1, -1, 0), "'", "_", 1, -1, 0), "-", "_", 1, -1, 0);
            //    if (str3 == "4_seasons")
            //    {
            //        str3 = "four_seasons");
            //    }
            //    System.Windows.Shapes.Path path2 = this.canvaspath.FindName(str3);
            //    this.rolloutcolor(path2);
            //}
            KeyValuePair pair = this.lstshop.SelectedItem as KeyValuePair;
            string str = pair.m_strValue.ToString();
            string str2 = str.ToLower().Replace(" ", "_");
            if (str2 == "4_seasons")
            {
                str2 = "four_seasons";
            }
            System.Windows.Shapes.Path controlname = this.canvaspath.FindName(str2) as System.Windows.Shapes.Path;
            if (controlname != null)
            {
                string str4 = null;
                KeyValuePair pair2 = this.lstshop.SelectedItem as KeyValuePair;
                IEnumerable<XElement> enumerable = 
                    this.xDoc1.Descendants("Shops").Elements<XElement>("shop");
                using (IEnumerator<XElement> enumerator = enumerable.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        str4 = enumerator.Current.Attribute("Location").Value;
                    }
                }
                if (str4 == "Level G")
                {
                    this.strlevellg.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 1")
                {
                    this.strlevel1.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level LG")
                {
                    this.strlevelg.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollover.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 2")
                {
                    this.strlevel2.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 3")
                {
                    this.strlevel3.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                this.fillcolor(controlname);
                this.txttooltip.Text = str;
                Canvas.SetLeft(this.bdrtooltip, controlname.Data.Bounds.Left);
                Canvas.SetTop(this.bdrtooltip, controlname.Data.Bounds.Top + 50.0);
                this.bdrtooltip.Visibility = Visibility.Collapsed;
                this.previoussearch = str;
            }
            else
            {
                this.previoussearch = "";
            }
        }

        private void btntextgo_Click(object sender, RoutedEventArgs e)
        {
            IEnumerator<XElement> enumerator = null;
            this.lstshopbyname.Visibility = Visibility.Visible;
            this.lstshopbyname.Items.Clear();
            IEnumerable<XElement> enumerable = this.xDoc1.Descendants("Shops").Elements<XElement>("shop")
                                                        .Where(x => x.Attribute("Name").Value.ToLower().Contains(this.txtsearch.Text.Trim().ToLower()));
            try
            {
                enumerator = enumerable.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    XElement element = enumerator.Current;
                    this.lstshopbyname.Items.Add(new KeyValuePair(element.Attribute("Id").Value, element.Attribute("Name").Value.Replace("^", "'")));
                }
            }
            finally
            {
                if (enumerator != null)
                {
                    enumerator.Dispose();
                }
            }
        }

        private void Catwalk_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.catwalk);
        }

        private void Catwalk_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.catwalk);
        }

        private void catwalk_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Catwalk");
        }

        private void ccd_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.ccd);
        }

        private void ccd_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.ccd);
        }

        private void ccd_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("CCD");
        }

        private void chemistry_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.chemistry);
        }

        private void chemistry_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.chemistry);
        }

        private void chemistry_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Chemistry");
        }

        private void Chili_s_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.chili_s);
        }

        private void Chili_s_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.chili_s);
        }

        private void chili_s_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Chili's");
        }

        private void cinemax_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.cinemax);
        }

        private void cinemax_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.cinemax);
        }

        private void cinemax_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Cinemax");
        }

        private void closeallotherestoryboard()
        {
            this.storytoilet.Stop();
            this.storytoilet.AutoReverse = true;
            this.storytoilet.Resume();
            this.storyumberlla.Stop();
            this.storyumberlla.AutoReverse = true;
            this.storyumberlla.Resume();
            this.storytailoring.Stop();
            this.storytailoring.AutoReverse = true;
            this.storytailoring.Resume();
            this.storyinformation.Stop();
            this.storyinformation.AutoReverse = true;
            this.storyinformation.Resume();
            this.storyladynamaj.Stop();
            this.storyladynamaj.AutoReverse = true;
            this.storyladynamaj.Resume();
            this.storygentsnamaj.Stop();
            this.storygentsnamaj.AutoReverse = true;
            this.storygentsnamaj.Resume();
            this.storyelectronicfeedback.Stop();
            this.storyelectronicfeedback.AutoReverse = true;
            this.storyelectronicfeedback.Resume();
            this.storyinfobooth.Stop();
            this.storyinfobooth.AutoReverse = true;
            this.storyinfobooth.Resume();
            this.storystairs.Stop();
            this.storystairs.AutoReverse = true;
            this.storystairs.Resume();
            this.storyescalator.Stop();
            this.storyescalator.AutoReverse = true;
            this.storyescalator.Resume();
            this.storyelevator.Stop();
            this.storyelevator.AutoReverse = true;
            this.storyelevator.Resume();
            this.storydisabled.Stop();
            this.storydisabled.AutoReverse = true;
            this.storydisabled.Resume();
            this.storybagpark.Stop();
            this.storybagpark.AutoReverse = true;
            this.storybagpark.Resume();
            this.storybabychangeunit.Stop();
            this.storybabychangeunit.AutoReverse = true;
            this.storybabychangeunit.Resume();
            this.storybabycare.Stop();
            this.storybabycare.AutoReverse = true;
            this.storybabycare.Resume();
            this.storyatm.Stop();
            this.storyatm.AutoReverse = true;
            this.storyatm.Resume();
        }

        private void da_milnos_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.da_milano);
        }

        private void da_milnos_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.da_milano);
        }

        private void da_milnos_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Da Milano");
        }

        private void dcw_Closed(object sender, EventArgs e)
        {
            string str = this.dcw.txtshopname.Text.ToLower().Replace(" ", "_");
            System.Windows.Shapes.Path controlname = this.canvaspath.FindName(str) as System.Windows.Shapes.Path;
            this.rolloutcolor(controlname);
        }

        private void editions_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.editions);
        }

        private void editions_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.editions);
        }

        private void editions_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Editions");
        }

        public static Stream Encode(WriteableBitmap wb)
        {
            int width = wb.PixelWidth;
            int height = wb.PixelHeight;
            int num3 = (width * 4) + 1;
            byte[] data = new byte[((num3 * height) - 1) + 1];
            int num8 = height - 1;
            for (int i = 0; i <= num8; i++)
            {
                data[i * num3] = 0;
                int num9 = width - 1;
                for (int j = 0; j <= num9; j++)
                {
                    int index = ((i * num3) + (j * 4)) + 3;
                    int num6 = wb.Pixels[j + (i * width)];
                    //data[Math.Max(Interlocked.Decrement(ref index), index + 1)] = num6 & 0xff;
                    //num6 = num6 >> 8;
                    //data[Math.Max(Interlocked.Decrement(ref index), index + 1)] = num6 & 0xff;
                    //num6 = num6 >> 8;
                    //data[Math.Max(Interlocked.Decrement(ref index), index + 1)] = num6 & 0xff;
                    //num6 = num6 >> 8;
                    //data[index] = num6 & 0xff;
                }
            }
            return PngEncoder.Encode(data, width, height);
        }

        private void envi_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.envi);
        }

        private void envi_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.envi);
        }

        private void envi_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Envi");
        }

        private void esbeda_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.esbeda);
        }

        private void esbeda_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.esbeda);
        }

        private void esbeda_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Esbeda");
        }

        private void ethos_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.ethos);
        }

        private void ethos_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.ethos);
        }

        private void ethos_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Ethos");
        }

        private void Fab_India_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.fabindia);
        }

        private void Fab_India_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.fabindia);
        }

        private void fab_india_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("FabIndia");
        }

        private object fillcolor(System.Windows.Shapes.Path controlname)
        {
            object obj2 = null;
            this.testsome.Stop();
            this.testv1.SetValue(Storyboard.TargetNameProperty, controlname.Name);
            this.testv.SetValue(Storyboard.TargetNameProperty, controlname.Name);
            this.testsome.Begin();
            this.testsome.RepeatBehavior = RepeatBehavior.Forever;
            if (controlname.Name == "funcity")
            {
                DropShadowEffect effect = new DropShadowEffect();
                effect.Opacity = 1.0;
                controlname.Effect = effect;
            }
            this.bdrtooltip.Visibility = Visibility.Visible;
            return obj2;
        }

        private void Four_Season_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.four_seasons);
        }

        private void Four_Season_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.four_seasons);
        }

        private void four_season_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("4 Seasons");
        }

        private void funcity_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.funcity);
        }

        private void funcity_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.funcity);
        }

        private void funcity_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Funcity");
        }

        private void giordano_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.giordano);
        }

        private void giordano_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.giordano);
        }

        private void giordano_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Giordano");
        }

        private void globus_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.globus);
        }

        private void globus_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.globus);
        }

        private void globus_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Globus");
        }

        private void globus1_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.globus1);
        }

        private void globus1_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.globus1);
        }

        private void globus1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Globus");
        }

        private void gloria_jeans_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.gloria_jeans_coffee);
        }

        private void gloria_jeans_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.gloria_jeans_coffee);
        }

        private void gloria_jeans_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Gloria Jeans Coffee");
        }

        private void Hidesign_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.hidesign);
        }

        private void Hidesign_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.hidesign);
        }

        private void hidesign_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Hidesign");
        }

        private void higlightquerystring(object shpname)
        {
            this.bdrtooltip.Visibility = Visibility.Visible;
            if (!string.IsNullOrEmpty(this.previoussearch))
            {
                string str3 = this.previoussearch.ToString().ToLower().Replace(" ", "_");
                System.Windows.Shapes.Path path2 = this.canvaspath.FindName(str3) as System.Windows.Shapes.Path;
                this.rolloutcolor(path2);
            }
            string str = shpname.ToString();
            string str2 = str.ToString().ToLower().Replace(" ", "_");
            System.Windows.Shapes.Path controlname = this.canvaspath.FindName(str2) as System.Windows.Shapes.Path;
            if (controlname!= null)
            {
                string str4 = null;
                IEnumerable<XElement> enumerable = this.xDoc1.Descendants("Shops").Elements<XElement>("shop");
                using (IEnumerator<XElement> enumerator = enumerable.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        str4 = enumerator.Current.Attribute("Location").Value;
                    }
                }
                if (str4 == "Level G")
                {
                    this.strlevellg.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 1")
                {
                    this.strlevel1.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level LG")
                {
                    this.strlevelg.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollover.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 2")
                {
                    this.strlevel2.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                else if (str4 == "Level 3")
                {
                    this.strlevel3.Begin();
                    this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollover.jpg", UriKind.RelativeOrAbsolute));
                    this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                }
                this.fillcolor(controlname);
                this.txttooltip.Text = str;
                //Canvas.SetLeft(this.bdrtooltip, controlname.Data.Bounds.Left);
                //Canvas.SetTop(this.bdrtooltip, controlname.Data.Bounds.Top + 50.0);
                this.bdrtooltip.Visibility = Visibility.Collapsed;
                this.previoussearch = str;
            }
            else
            {
                this.previoussearch = "";
            }
        }

        private void hypercity_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.hypercity);
        }

        private void hypercity_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.hypercity);
        }

        private void hypercity_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Hypercity");
        }

        private void ico_atm_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "atm";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 156.0);
            this.startlegendsearch();
        }

        private void ico_babycare_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "babycare";
            this.bdrlegendsearch.Height = 46.0;
            this.canvaslegendsearch.Height = 44.0;
            Canvas.SetTop(this.bdrlegendsearch, 260.0);
            this.startlegendsearch();
        }

        private void ico_babychange_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "babychange";
            this.bdrlegendsearch.Height = 46.0;
            this.canvaslegendsearch.Height = 44.0;
            Canvas.SetTop(this.bdrlegendsearch, 286.0);
            this.startlegendsearch();
        }

        private void ico_bagpark_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "bagpark";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 312.0);
            this.startlegendsearch();
        }

        private void ico_disabled_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Text = "Level LG";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "diabled";
            this.bdrlegendsearch.Height = 46.0;
            this.canvaslegendsearch.Height = 44.0;
            Canvas.SetTop(this.bdrlegendsearch, 234.0);
            this.startlegendsearch();
        }

        private void ico_elevator_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Text = "Level G";
            this.txtlvl3.Text = "Level 1";
            this.txtlvl4.Text = "Level 2";
            this.txtlvl5.Text = "Level 3";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Collapsed;
            this.txtlvl4.Visibility = Visibility.Collapsed;
            this.txtlvl5.Visibility = Visibility.Collapsed;
            this.txtmode.Text = "elevator";
            this.bdrlegendsearch.Height = 109.0;
            this.canvaslegendsearch.Height = 107.0;
            Canvas.SetTop(this.bdrlegendsearch, 104.0);
            this.startlegendsearch();
        }

        private void ico_escalator_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Text = "Level G";
            this.txtlvl3.Text = "Level 1";
            this.txtlvl4.Text = "Level 2";
            this.txtlvl5.Text = "Level 3";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Collapsed;
            this.txtlvl4.Visibility = Visibility.Collapsed;
            this.txtlvl5.Visibility = Visibility.Collapsed;
            this.txtmode.Text = "escalator";
            this.bdrlegendsearch.Height = 109.0;
            this.canvaslegendsearch.Height = 107.0;
            Canvas.SetTop(this.bdrlegendsearch, 182.0);
            this.startlegendsearch();
        }

        private void ico_feedback_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "feedback";
            this.bdrlegendsearch.Height = 46.0;
            this.canvaslegendsearch.Height = 44.0;
            Canvas.SetTop(this.bdrlegendsearch, 338.0);
            this.startlegendsearch();
        }

        private void ico_gentsnamaz_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "gentsnamaz";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 364.0);
            this.startlegendsearch();
        }

        private void ico_infobooth_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "infobooth";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 208.0);
            this.startlegendsearch();
        }

        private void ico_information_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "information";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 416.0);
            this.startlegendsearch();
        }

        private void ico_ladiesnamaz_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level 2";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "ladiesnamaz";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 390.0);
            this.startlegendsearch();
        }

        private void ico_stairs_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Text = "Level G";
            this.txtlvl3.Text = "Level 1";
            this.txtlvl4.Text = "Level 2";
            this.txtlvl5.Text = "Level 3";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Collapsed;
            this.txtlvl4.Visibility = Visibility.Collapsed;
            this.txtlvl5.Visibility = Visibility.Collapsed;
            this.txtmode.Text = "stairs";
            this.bdrlegendsearch.Height = 109.0;
            this.canvaslegendsearch.Height = 107.0;
            Canvas.SetTop(this.bdrlegendsearch, 130.0);
            this.startlegendsearch();
        }

        private void ico_tailoring_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level G";
            this.txtlvl2.Visibility = Visibility.Visible;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "tailoring";
            this.bdrlegendsearch.Height = 26.0;
            this.canvaslegendsearch.Height = 24.0;
            Canvas.SetTop(this.bdrlegendsearch, 442.0);
            this.startlegendsearch();
        }

        private void ico_toilet_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Text = "Level G";
            this.txtlvl3.Text = "Level 1";
            this.txtlvl4.Text = "Level 2";
            this.txtlvl5.Text = "Level 3";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Collapsed;
            this.txtlvl4.Visibility = Visibility.Collapsed;
            this.txtlvl5.Visibility = Visibility.Collapsed;
            this.txtmode.Text = "toilet";
            this.bdrlegendsearch.Height = 109.0;
            this.canvaslegendsearch.Height = 107.0;
            Canvas.SetTop(this.bdrlegendsearch, 62.0);
            this.startlegendsearch();
        }

        private void ico_umbrella_MouseEnter(object sender, MouseEventArgs e)
        {
            this.txtlvl1.Text = "Level LG";
            this.txtlvl2.Text = "Level G";
            this.txtlvl2.Visibility = Visibility.Collapsed;
            this.txtlvl3.Visibility = Visibility.Visible;
            this.txtlvl4.Visibility = Visibility.Visible;
            this.txtlvl5.Visibility = Visibility.Visible;
            this.txtmode.Text = "umbrella";
            this.bdrlegendsearch.Height = 46.0;
            this.canvaslegendsearch.Height = 44.0;
            Canvas.SetTop(this.bdrlegendsearch, 468.0);
            this.startlegendsearch();
        }

        private void Identiti_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.identiti);
        }

        private void Identiti_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.identiti);
        }

        private void identiti_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Identiti");
        }

        private void INC_5_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.inc_5);
        }

        private void INC_5_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.inc_5);
        }

        private void indian_art_cafe_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.indian_art_cafe);
        }

        private void indian_art_cafe_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.indian_art_cafe);
        }

        private void indian_art_cafe_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Indian Art Cafe");
        }

        private void Indian_Tadka_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.indian_tadka);
        }

        private void Indian_Tadka_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.indian_tadka);
        }

        private void indian_tadka_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Indian Tadka");
        }

        private void Inhabit_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.inhabit);
        }

        private void Inhabit_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.inhabit);
        }

        private void inhabit_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Inhabit");
        }

        private void istore_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.i_store);
        }

        private void istore_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.i_store);
        }

        private void istore_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("I-Store");
        }

        private void Jalenpenos_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.jalapenos);
        }

        private void Jalenpenos_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.jalapenos);
        }

        private void jalenpenos_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Jalapenos");
        }

        private void Jashn_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.jashn);
        }

        private void Jashn_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.jashn);
        }

        private void jashn_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Jashn");
        }

        private void kailash_parbat_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.kailash_parbat);
        }

        private void kailash_parbat_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.kailash_parbat);
        }

        private void kailash_parbat_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Kailash Parbat");
        }

        private void Kalanjali_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.kalanjali);
        }

        private void Kalanjali_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.kalanjali);
        }

        private void kalanjali_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Kalanjali");
        }

        private void kazo_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.arrow);
        }

        private void kazo_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.arrow);
        }

        private void kazo_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Arrow");
        }

        private void KFC_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.kfc);
        }

        private void KFC_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.kfc);
        }

        private void kfc_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("KFC");
        }

        private void krishna_pearls_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.krishna_pearls);
        }

        private void krishna_pearls_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.krishna_pearls);
        }

        private void krishna_pearls_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Krishna Pearls");
        }

        private void lacoste_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lacoste);
        }

        private void lacoste_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lacoste);
        }

        private void lacoste_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lacoste");
        }

        private void lee_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lee);
        }

        private void lee_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lee);
        }

        private void lee_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lee");
        }

        private void levi_s_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.levis);
        }

        private void levi_s_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.levis);
        }

        private void levi_s_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Levis");
        }

        private void lifestyle_level1_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lifestyle_level1);
        }

        private void lifestyle_level1_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lifestyle_level1);
        }

        private void lifestyle_level1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lifestyle-Level1");
        }

        private void lifestyle_level2_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lifestyle_level2);
        }

        private void lifestyle_level2_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lifestyle_level2);
        }

        private void lifestyle_level2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lifestyle-Level2");
        }

        private void Lifestyle_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lifestyle);
        }

        private void Lifestyle_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lifestyle);
        }

        private void lifestyle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lifestyle");
        }

        private void lstcategory_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.lstcategory.SelectedIndex != 0)
            {
                this.lstshop.Items.Clear();
                KeyValuePair pair = this.lstcategory.SelectedItem as KeyValuePair;
                //e$__.$VB$Local_catid = Convert.ToInt32(pair.m_objKey.ToString());
                IEnumerable<XElement> enumerable = this.xDoc1.Descendants("Shops").Elements<XElement>("shop");
                foreach (XElement element in enumerable)
                {
                    this.lstshop.Items.Add(new KeyValuePair(element.Attribute("Id").Value, element.Attribute("Name").Value.Replace("^", "'")));
                }
                if (this.lstshop.Items.Count != 0)
                {
                    this.lstshop.SelectedIndex = 0;
                }
            }
        }

        private void lstshopbyname_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            this.bdrtooltip.Visibility = Visibility.Visible;
            if (!string.IsNullOrEmpty(this.previoussearch))
            {
                string str = this.previoussearch.ToString().ToLower().Replace(" ", "_");
                if (str == "4_seasons")
                {
                    str = "four_seasons";
                }
                System.Windows.Shapes.Path controlname = this.canvaspath.FindName(str) as System.Windows.Shapes.Path;
                this.rolloutcolor(controlname);
            }
            if (this.lstshopbyname.Items.Count > 0)
            {
                KeyValuePair pair = this.lstshopbyname.SelectedItem as KeyValuePair;
                if (pair != null)
                {
                    string str2 = pair.m_strValue.ToString();
                    string str3 = str2.ToString().ToLower().Replace(" ", "_");
                    if (str3 == "4_seasons")
                    {
                        str3 = "four_seasons";
                    }
                    System.Windows.Shapes.Path path2 = this.canvaspath.FindName(str3) as System.Windows.Shapes.Path;
                    if (path2 != null)
                    {
                        string str4 = null;
                        KeyValuePair pair2 = this.lstshopbyname.SelectedItem as KeyValuePair;
                        //e$__.$VB$Local_shopid = Convert.ToInt32(pair2.m_objKey.ToString());
                        IEnumerable<XElement> enumerable = this.xDoc1.Descendants("Shops").Elements<XElement>("shop");
                        using (IEnumerator<XElement> enumerator = enumerable.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                str4 = enumerator.Current.Attribute("Location").Value;
                            }
                        }
                        if (str4 == "Level G")
                        {
                            this.strlevellg.Begin();
                            this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollover.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                        }
                        else if (str4 == "Level 1")
                        {
                            this.strlevel1.Begin();
                            this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollover.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                        }
                        else if (str4 == "Level LG")
                        {
                            this.strlevelg.Begin();
                            this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollover.jpg", UriKind.RelativeOrAbsolute));
                        }
                        else if (str4 == "Level 2")
                        {
                            this.strlevel2.Begin();
                            this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollover.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                        }
                        else if (str4 == "Level 3")
                        {
                            this.strlevel3.Begin();
                            this.btnlevel1.Source = new BitmapImage(new Uri("images/level 1_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevelg.Source = new BitmapImage(new Uri("images/level g_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel2.Source = new BitmapImage(new Uri("images/level 2_rollout.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevel3.Source = new BitmapImage(new Uri("images/level 3_rollover.jpg", UriKind.RelativeOrAbsolute));
                            this.btnlevellg.Source = new BitmapImage(new Uri("images/level-lg_rollout.jpg", UriKind.RelativeOrAbsolute));
                        }
                        this.fillcolor(path2);
                        this.txttooltip.Text = str2;
                        Canvas.SetLeft(this.bdrtooltip, path2.Data.Bounds.Left);
                        Canvas.SetTop(this.bdrtooltip, path2.Data.Bounds.Top + 50.0);
                        this.bdrtooltip.Visibility = Visibility.Collapsed;
                        this.previoussearch = str2;
                    }
                    else
                    {
                        this.previoussearch = "";
                    }
                }
            }
        }

        private void Lush_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.lush);
        }

        private void Lush_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.lush);
        }

        private void lush_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Lush");
        }

        private void Mac_Donald_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.mc_donald_s);
        }

        private void Mac_Donald_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.mc_donald_s);
        }

        private void mac_donald_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Mc Donald's");
        }

        private void Mad_About_China_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.mad_about_china);
        }

        private void Mad_About_China_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.mad_about_china);
        }

        private void mad_about_china_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Mad About China");
        }

        private void Madras_Mail_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.madras_mail);
        }

        private void Madras_Mail_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.madras_mail);
        }

        private void madras_mail_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Madras Mail");
        }

        private void mainentry_MouseEnter(object sender, MouseEventArgs e)
        {
        }

        private void mainentry_MouseLeave(object sender, MouseEventArgs e)
        {
        }

        private void Mangatrai_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.mangatrai);
        }

        private void Mangatrai_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.mangatrai);
        }

        private void mangatrai_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Mangatrai");
        }

        private void Manyavar_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.manyavar);
        }

        private void Manyavar_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.manyavar);
        }

        private void manyavar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Manyavar");
        }

        private void Maple_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.maple);
        }

        private void Maple_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.maple);
        }

        private void maple_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Maple");
        }

        private void marks_and_spancers1_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.marks_and_spencer_levelg);
        }

        private void marks_and_spancers1_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.marks_and_spencer_levelg);
        }

        private void marks_and_spancers1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Marks and Spencer LevelG");
        }

        private void marks_and_spencer_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.marks_and_spencer);
        }

        private void marks_and_spencer_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.marks_and_spencer);
        }

        private void marks_and_spencer_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Marks and Spencer");
        }

        private void max_level2_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.max_level2);
        }

        private void max_level2_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.max_level2);
        }

        private void max_level2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Max level2");
        }

        private void Max_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.max);
        }

        private void Max_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.max);
        }

        private void max_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Max");
        }

        private void Mebaz_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.mebaz);
        }

        private void Mebaz_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.mebaz);
        }

        private void mebaz_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Mebaz");
        }

        private void Mochi_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.mochi);
        }

        private void Mochi_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.mochi);
        }

        private void mochi_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Mochi");
        }

        private void movenpick_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.movenpick);
        }

        private void movenpick_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.movenpick);
        }

        private void movenpick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Movenpick");
        }

        private void new_u_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.new_u);
        }

        private void new_u_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.new_u);
        }

        private void new_u_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("New U");
        }

        private void news_cafe_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.news_cafe);
        }

        private void news_cafe_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.news_cafe);
        }

        private void news_cafe_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("News Cafe");
        }

        private void Newscafe_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.news_cafe_level1);
        }

        private void Newscafe_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.news_cafe_level1);
        }

        private void newscafe_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("News cafe Level1");
        }

        private void Nirvana_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.nirvana);
        }

        private void Nirvana_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.nirvana);
        }

        private void nirvana_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Nirvana");
        }

        private void Nysa_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.nysa);
        }

        private void Nysa_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.nysa);
        }

        private void nysa_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Nysa");
        }

        private void only_shirts_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.shirts_and_more);
        }

        private void only_shirts_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.shirts_and_more);
        }

        private void only_shirts_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Shirts and More");
        }

        private void Opium_spa_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.opium_spa);
        }

        private void Opium_spa_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.opium_spa);
        }

        private void opium_spa_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Opium Spa");
        }

        private void Origin_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.origin);
        }

        private void Origin_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.origin);
        }

        private void origin_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Origin");
        }

        private void osim_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.osim);
        }

        private void osim_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.osim);
        }

        private void osim_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Osim");
        }

        private void Pantaloons_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pantaloons);
        }

        private void Pantaloons_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pantaloons);
        }

        private void pantaloons_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pantaloons");
        }

        private void parcos_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.parcos);
        }

        private void parcos_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.parcos);
        }

        private void parcos_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Parcos");
        }

        private void pavers_england_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pavers_england);
        }

        private void pavers_england_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pavers_england);
        }

        private void pavers_england_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pavers England");
        }

        private void Peora_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.peora);
        }

        private void Peora_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.peora);
        }

        private void peora_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Peora");
        }

        private void pepe_jeans_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pepe_jeans);
        }

        private void pepe_jeans_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pepe_jeans);
        }

        private void pepe_jeans_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pepe Jeans");
        }

        private void pizza_hut_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pizza_hut);
        }

        private void pizza_hut_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pizza_hut);
        }

        private void pizza_hut_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pizza Hut");
        }

        private void PizzaCorner_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pizza_corner);
        }

        private void PizzaCorner_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pizza_corner);
        }

        private void pizzacorner_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pizza corner");
        }

        private void PlanetSports_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.planet_sports);
        }

        private void PlanetSports_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.planet_sports);
        }

        private void planetsports_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Planet Sports");
        }

        private void Proline_Fitness_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.proline_fitness);
        }

        private void Proline_Fitness_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.proline_fitness);
        }

        private void proline_fitness_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Proline Fitness");
        }

        private void Proline_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.proline);
        }

        private void Proline_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.proline);
        }

        private void proline_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Proline");
        }

        private void provogue_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.provogue);
        }

        private void provogue_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.provogue);
        }

        private void provogue_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Provogue");
        }

        private void Puma_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.puma);
        }

        private void Puma_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.puma);
        }

        private void puma_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Puma");
        }

        private void Pumkin_pitch_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.pumpkin_patch);
        }

        private void Pumkin_pitch_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.pumpkin_patch);
        }

        private void pumkin_pitch_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Pumpkin Patch");
        }

        private void ramesh_watch_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.ramesh_watch);
        }

        private void ramesh_watch_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.ramesh_watch);
        }

        private void ramesh_watch_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Ramesh Watch");
        }

        private void raymonds_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.raymonds);
        }

        private void raymonds_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.raymonds);
        }

        private void raymonds_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Raymonds");
        }

        private void Reebok_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.reebok);
        }

        private void Reebok_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.reebok);
        }

        private void reebok_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Reebok");
        }

        private void reliance_digital_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.reliance_digital);
        }

        private void reliance_digital_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.reliance_digital);
        }

        private void reliance_digital_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Reliance Digital");
        }

        private void remanika_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.remanika);
        }

        private void remanika_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.remanika);
        }

        private void remanika_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Remanika");
        }

        private void Rocia_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.rocia);
        }

        private void Rocia_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.rocia);
        }

        private void rocia_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Rocia");
        }

        public object rolloutcolor(System.Windows.Shapes.Path controlname)
        {
            object obj2 = null;
            this.testsome.Stop();
            this.bdrtooltip.Visibility = Visibility.Visible;
            return obj2;
        }

        private void Scoops_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.scoops);
        }

        private void Scoops_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.scoops);
        }

        private void scoops_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Scoops");
        }

        private void selectstorytype()
        {
            string str = this.txtmode.Text;
            string str2 = str;
            if (str2 == "toilet")
            {
                this.closeallotherestoryboard();
                this.storytoilet.Stop();
                this.storytoilet.AutoReverse = false;
                this.storytoilet.Begin();
            }
            else if (str2 == "umbrella")
            {
                this.closeallotherestoryboard();
                this.storyumberlla.Stop();
                this.storyumberlla.AutoReverse = false;
                this.storyumberlla.Begin();
            }
            else if (str2 == "tailoring")
            {
                this.closeallotherestoryboard();
                this.storytailoring.Stop();
                this.storytailoring.AutoReverse = false;
                this.storytailoring.Begin();
            }
            else if (str2 == "information")
            {
                this.closeallotherestoryboard();
                this.storyinformation.Stop();
                this.storyinformation.AutoReverse = false;
                this.storyinformation.Begin();
            }
            else if (str2 == "ladiesnamaz")
            {
                this.closeallotherestoryboard();
                this.storyladynamaj.Stop();
                this.storyladynamaj.AutoReverse = false;
                this.storyladynamaj.Begin();
            }
            else if (str2 == "gentsnamaz")
            {
                this.closeallotherestoryboard();
                this.storygentsnamaj.Stop();
                this.storygentsnamaj.AutoReverse = false;
                this.storygentsnamaj.Begin();
            }
            else if (str2 == "feedback")
            {
                this.closeallotherestoryboard();
                this.storyelectronicfeedback.Stop();
                this.storyelectronicfeedback.AutoReverse = false;
                this.storyelectronicfeedback.Begin();
            }
            else if (str2 == "infobooth")
            {
                this.closeallotherestoryboard();
                this.storyinfobooth.Stop();
                this.storyinfobooth.AutoReverse = false;
                this.storyinfobooth.Begin();
            }
            else if (str2 == "stairs")
            {
                this.closeallotherestoryboard();
                this.storystairs.Stop();
                this.storystairs.AutoReverse = false;
                this.storystairs.Begin();
            }
            else if (str2 == "escalator")
            {
                this.closeallotherestoryboard();
                this.storyescalator.Stop();
                this.storyescalator.AutoReverse = false;
                this.storyescalator.Begin();
            }
            else if (str2 == "elevator")
            {
                this.closeallotherestoryboard();
                this.storyelevator.Stop();
                this.storyelevator.AutoReverse = false;
                this.storyelevator.Begin();
            }
            else if (str2 == "diabled")
            {
                this.closeallotherestoryboard();
                this.storydisabled.Stop();
                this.storydisabled.AutoReverse = false;
                this.storydisabled.Begin();
            }
            else if (str2 == "bagpark")
            {
                this.closeallotherestoryboard();
                this.storybagpark.Stop();
                this.storybagpark.AutoReverse = false;
                this.storybagpark.Begin();
            }
            else if (str2 == "babychange")
            {
                this.closeallotherestoryboard();
                this.storybabychangeunit.Stop();
                this.storybabychangeunit.AutoReverse = false;
                this.storybabychangeunit.Begin();
            }
            else if (str2 == "babycare")
            {
                this.closeallotherestoryboard();
                this.storybabycare.Stop();
                this.storybabycare.AutoReverse = false;
                this.storybabycare.Begin();
            }
            else if (str2 == "atm")
            {
                this.closeallotherestoryboard();
                this.storyatm.Stop();
                this.storyatm.AutoReverse = false;
                this.storyatm.Begin();
            }
        }

        private void shopper_s_stop_level1_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.shoppers_stop_level1);
        }

        private void shopper_s_stop_level1_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.shoppers_stop_level1);
        }

        private void shopper_s_stop_level1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Shoppers Stop Level1");
        }

        private void shopper_s_stop1_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.shoppers_stop);
        }

        private void shopper_s_stop1_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.shoppers_stop);
        }

        private void shopper_s_stop1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Shoppers Stop");
        }

        private void Shoppers_Stop_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.shoppers_stop);
        }

        private void Shoppers_Stop_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.shoppers_stop);
        }

        private void shoppers_stop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Shoppers Stop");
        }

        private void showdetails(object shopname)
        {
            this.dcw.txtshopname.Text = "";
            this.dcw.txtlocation.Text = "";
            this.dcw.txtdescription.Text = "";
            this.dcw.thumbnail.Source = null;
            this.dcw.txtshopname.Text = shopname as string;
            IEnumerable<XElement> enumerable = this.xDoc1.Descendants("Shops").Elements<XElement>("shop");
            foreach (XElement element in enumerable)
            {
                this.dcw.txtlocation.Text = element.Attribute("Location").Value;
                string str = element.Attribute("Description").Value.Replace("<p>", "").Replace("</p>", "");
                this.dcw.txtdescription.Text = str;
                if (element.Attribute("ImagePath").Value != "")
                {
                    this.dcw.thumbnail.Source = new BitmapImage(new Uri(element.Attribute("ImagePath").Value.Replace("../cyberabad/ClientBin/", ""), UriKind.RelativeOrAbsolute));
                }
                else
                {
                    this.dcw.thumbnail.Source = new BitmapImage(new Uri("images/noimage.png", 0));
                }
            }
            this.dcw.HasCloseButton = false;
            this.dcw.Show();
        }

        private void startlegendsearch()
        {
            this.storysearchlegend.Stop();
            this.storysearchlegend.AutoReverse = false;
            this.storysearchlegend.Begin();
        }

        private void stopsearchlegendstory()
        {
            this.storysearchlegend.Stop();
            this.storysearchlegend.AutoReverse = true;
            this.storysearchlegend.Resume();
        }

        private void Subway_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.subway);
        }

        private void Subway_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.subway);
        }

        private void subway_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Subway");
        }

        private void sunglass_hut_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.sunglass_hut);
        }

        private void sunglass_hut_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.sunglass_hut);
        }

        private void sunglass_hut_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Sunglass Hut");
        }

        private void titan_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.titan);
        }

        private void titan_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.titan);
        }

        private void titan_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Titan");
        }

        private void ucb_kids_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.ucb_kids);
        }

        private void ucb_kids_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.ucb_kids);
        }

        private void ucb_kids_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("UCB Kids");
        }

        private void VIP_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.vip);
        }

        private void VIP_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.vip);
        }

        private void vip_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("VIP");
        }

        private void vision_express_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.vision_express);
        }

        private void vision_express_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.vision_express);
        }

        private void vision_express_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Vision Express");
        }

        private void wildcraft_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.wildcraft);
        }

        private void wildcraft_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.wildcraft);
        }

        private void wildcraft_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Wildcraft");
        }

        private void wrangler_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.wrangler);
        }

        private void wrangler_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.wrangler);
        }

        private void wrangler_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Wrangler");
        }

        private void zodiac_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.zodiac);
        }

        private void zodiac_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.zodiac);
        }

        private void zodiac_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Zodiac");
        }

        private void Zuni_MouseEnter(object sender, MouseEventArgs e)
        {
            this.fillcolor(this.zuni);
        }

        private void Zuni_MouseLeave(object sender, MouseEventArgs e)
        {
            this.rolloutcolor(this.zuni);
        }

        private void zuni_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.showdetails("Zuni");
        }

    }
}
